document.getElementById('content').addEventListener('input', function () {
    document.getElementById('preview').innerHTML = marked.parse(this.value);
});